package com.ant.myagile
import com.ant.myagile.backlog.RetrospectiveResult
import com.ant.myagile.backlog.UserStory
class Project {

	String projectName
	String description
	String imagePath
	Boolean isPublic = Boolean.FALSE
	Member owner	
	
	static belongsTo = [owner: Member]

	static hasMany = [teams : Team, userStories: UserStory, teamProjects: Team_Project,retrospectiveResults:RetrospectiveResult]

	static constraints = {
		
		projectName blank: false
		description(nullable: true)
		owner nullable: true
		imagePath nullable: true
		
	}
	static mapping = {
		version false
		id column : "projectId"
		description(sqlType : "text")
	}

	@Override
	public String toString() {
		return projectName;
	}
	
	
}
